package qc.module.qms.mapper;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import qc.module.qms.dto.exchange.category.ExchangeCategoryDto;
import qc.module.qms.entity.ExchangeCategory;

import java.util.List;

/**
 * ExchangeCategoryMapper
 *
 * @author QuCheng Tech
 * @since 2024/1/24
 */
@Mapper
public interface ExchangeCategoryMapper {
    ExchangeCategoryMapper MAPPER = Mappers.getMapper(ExchangeCategoryMapper.class);

    ExchangeCategory toEntity(ExchangeCategoryDto dto);

    @Mapping(target = "params", source = "params")
    ExchangeCategoryDto toDto(ExchangeCategory en);

    List<ExchangeCategoryDto> toDtoList(List<ExchangeCategory> list);
}
